package com.qinggeng.project.api.controller;

import com.qinggeng.framework.web.domain.AjaxResult;
import com.qinggeng.project.api.security.annotation.LoginRequired;
import com.qinggeng.project.api.security.utils.ApiUtils;
import com.qinggeng.project.system.domain.GoodsVip;
import com.qinggeng.project.system.service.GoodsVipService;
import com.qinggeng.project.system.service.IUserActivityService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("${apiPath}/vip")
@CrossOrigin
public class ApiGoodsVipController {

    @Resource
    private GoodsVipService goodsVipService;


    @GetMapping("/list")
    @LoginRequired
    public AjaxResult vip(){
         Long userId=ApiUtils.getUserId();
         List<GoodsVip> list=  goodsVipService.listGoodsVip(userId);
        return AjaxResult.success(list);
    }



}
